This folder contains the code and data required to replicate the results of the paper 
"Does Goal Revision Undermine Self-Regulation Through Goals? An Experiment" 
by Jonas Pilgaard Kaiser, Alexander K. Koch, and Julia Nafziger.

The folders are structured as follows:
- Code: The file GoalRevisionReplication.do contains all codes to replicate the results
	of the paper. To run the code, simply change the path on line 22 to match the path on your computer.
	Note that the code was written in Stata versions 16-18. There may be problems running the code with earlier versions of Stata.

- DataPreparation: The file anonymous_data.dta contains the uncleaned data with the only 
	changes from the raw data being a merge of data sets and anonymization. The code 
	in GoalRevisionDataPreparation.do contains all codes to clean the data and produce 
	the data file cleaned_data.dta and ReplicationData.dta.
	To run the code, simply change the path on line 12 to mach the path on your computer.

- Input: This folder contains the data set ReplicationData.dta that stores all the data
	required to replicate the results.

- Output: As the code runs, all tables and figures are stored in this folder.

- Temp: As the code runs, this folder stores auxilliary figures used to create the final outputs in the 
	Output folder.

- QualtricsCodes: This folder contains the codes for the Qualtrics surveys used for data collection. Goalrevisionconsent.qfs runs the consent form, GoalrevisionPart1.qsf runs the first part of the study, and GoalrevisionPart2.qsf runs the second part of the study. Experimentalinstructions.doc reproduces the experimental instructions implemented by the Qualtrics surveys.


The replication data set includes the following variables:
No.  Variable name          Explanation
1    ID                     Subject ID
2    treatment              Treatment
3    effort                 Effort
4    goal0                  Goal 0
5    goal1                  Goal 1
6    displaygoal            Displayed goal
7    revisegoal1            Goal 1 if in Revise0 or Revise1
8    goalrevision_cont      Goal revision, continuous
9    goalrevision_bin       Goal revision, binary
10   achieve_cont_display   Continuous goal achievement, displayed goal
11   achieve_cont0          Continuous goal achievement, goal 0
12   achieve_cont1          Continuous goal achievement, goal 1
13   achieve_bin_display    Binary goal achievement, displayed goal
14   achieve_bin_0          Binary goal achievement, goal 0
15   achieve_bin_1          Binary goal achievement, goal 1
16   time_mean              Average time pr. table in seconds
17   mistakes_mean          Average mistakes pr. table
18   d0productivity1        Productivity, Date 0
19   d1productivity1        Productivity, Date 1
20   productivity_change    Change in productivity between date 0 and date 1
21   base_productivity      Productivity upon goal setting (date 0 in Early, date 1 in Late)
22   time_shock             Dummy equal to 1 if less time or more time equals 1
23   lesstime               Dummy equal to 1 if subject is time constrained at date 1 but not at date 0
24   moretime               Dummy equal to 1 if subject is time constrained at date 0 but not at date 1
25   timediff               Difference in flexible time
26   uncertainty            Uncertainty about whether the subject will have 2 hours of flexible time at date 1
27   uncertainty_high       Binary variable equal to 1 if uncertainty is high
28   d0time_constrained     Dummy equal to 1 if weakly less than 2 hours of flexible time (planned at date 0)
29   d1time_constrained     Dummy equal to 1 if weakly less than 2 hours of flexible time (stated at date 1)
30   time_constrained       Time-constrained at the time of setting goal (date 0 in Early, date 1 in Late)
31   examassign             Number of exams and assignments
32   crt                    Score on cognitive reflection test
33   enjoypre               Enjoyment of the task, stated at date 0
34   risk                   Self-reported risk tolerance
35   selfcomp               Self-competition measure
36   d0response_time        Time spent setting goal at date 0, truncated at 300 seconds
37   d1response_time        Time spent setting goal at date 1, truncated at 300 seconds
38   response_time          Time spent at goal setting (date 0 in Early, date 1 in Late)
39   d0slidermoved          Slider moved at goal setting, Date 0
40   d1slidermoved          Slider moved at goal setting, Date 1
41   slidermoved            Slider moved at goal setting (date 0 in Early, date 1 in Late)
42   recall0                Remembered goal 0 at date 2
43   recall1                Remembered goal 1 at date 2
44   enjoypost              Enjoyment of the task, stated at date 1
45   enjoychange            Difference between enjoypost and enjoypre
46   caremore               1 if cared more about goal 0, -1 if cared more about goal 1, 0 if cared equally about the goals (reported at date 2)
47   goal0inmind            Binary variable equal to 1 if subject in Late had a goal at date 0
48   altgoal0               The goal that subject in Late had at date 0 if goal0inmind=1
49   goal1inmind            Binary variable equal to 1 if subject in Early had an alternative goal in mind at date 1
50   altgoal1               The goal that subject in Early had at date 1 if goal1inmind=1
51   commit0                Average stated commitment to goal 0, stated at date 2
52   commit1                Average stated commitment to goal 1, stated at date 2
53   d1completed            Completed experimental part at date 1
54   d2completed            Completed experimental part at date 2
55   d0late                 Binary variable equal to 1 if subject was allocated to the Late treatment at date 0
56   age                    Age
57   faculty                Faculty
58   degree                 Degree
59   econbusi               Binary variable equal to 1 if subject studies Economics or Business
60   schedule_error         Binary variable equal to 1 if subject was influenced by a schedule error
61   earningssched          Variable containing the earningsschedule for counting tables